﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ExpressInfoEdit.ascx.cs" Inherits="ExaminationSys.View.News.ExpressInfoEdit" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script type="text/javascript" language="javascript">
    var setID = function (param) {
        try {

            var hidden = document.getElementById('<%=ExpressIDHidden.ClientID %>');
            hidden.value = param;
        } catch (e) {
            alert(e);
        }
    };
</script>

<input type="hidden" id="ExpressIDHidden" runat="server" />
<input type="hidden" id="NewsTypeIDHidden" runat="server" />
<ext:Window 
    ID="ExpressInfoEditWindow" 
    runat="server" 
    Icon="Group" 
    Title="公共信息(信息快递)编辑"
    Width="750" 
    Height="600" 
    AutoShow="false" 
    Modal="true" 
    Hidden="true"
    Layout="Fit">
    <Items>       
                <ext:FormPanel 
                    ID="NewsTypeEditPanel" 
                    runat="server" 
                    Icon="ChartOrganisation"
                    DefaultAnchor="95%"
                    Padding="5"
                    BodyPadding="10">
                    <Items>
                        <ext:TextField ID="NewsTitle"  AllowBlank="false" runat="server" FieldLabel="标题" />    
                         <%--<ext:SelectBox
                            ID="NewsType"
                            runat="server" 
                            DisplayField="Name"
                            ValueField="ID"
                            FieldLabel="类别" 
                            ForceSelection="true"
                          >
                            <Store>
                                <ext:Store ID="NewsTypeStore" runat="server">
                                    <Model>
                                        <ext:Model runat="server">
                                            <Fields>
                                                <ext:ModelField Name="ID" />
                                                <ext:ModelField Name="Name" />
                                            </Fields>
                                        </ext:Model>
                                    </Model>            
                                </ext:Store>    
                            </Store>    
                        </ext:SelectBox>--%>
                        <ext:Checkbox ID="NewsStatus" Checked="true" runat="server" FieldLabel="是否发布"></ext:Checkbox>   
                        <ext:Checkbox ID="IsRecommend" Checked="false" runat="server" FieldLabel="是否推荐"></ext:Checkbox>    
                        <ext:TextField ID="NewsTypeName" Name="NewsTypeName" ReadOnly="true"  AllowBlank="false" runat="server" FieldLabel="类别" />   
                         <ext:HtmlEditor ID="NewsContent" FieldLabel="内容" runat="server" AutoScroll="true" Height="450" />
                    </Items>
                </ext:FormPanel>
    </Items>
    <Buttons>
        <ext:Button ID="SaveButton" runat="server" Text="保存" Icon="BulletGo">
            <DirectEvents>
                <Click OnEvent="SaveExpressInfo" Failure="Ext.MessageBox.alert('Saving failed', 'Error during ajax event');">
                </Click>
            </DirectEvents>
            
        </ext:Button>
        <ext:Button ID="CancelButton" runat="server" Text="取消" Icon="Cancel">
            <Listeners>
                 <Click Handler="#{ExpressInfoEditWindow}.hide(null);" />
            </Listeners>
        </ext:Button>
    </Buttons>
</ext:Window>